package com.wlsk.license.common.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * 包车牌状态
 */
public enum CharterReviewStatusEnum implements BaseEnum<CharterReviewStatusEnum, String> {

    SUBMIT("91190001", "提交"),
    RETURN("91190005", "打回重填"),
    CANCEL("91190002", "取消流程"),
    TERMINATE("91190004", "终止"),
    APPROVE("91190003", "同意");

    private final String code;

    private final String description;

    private static Map<String, CharterReviewStatusEnum> valueMap = new HashMap<>();

    CharterReviewStatusEnum(String code, String description) {
        this.code = code;
        this.description = description;
    }

    static {
        for (CharterReviewStatusEnum e : CharterReviewStatusEnum.values()) {
            valueMap.put(e.code, e);
        }
    }

    public static CharterReviewStatusEnum get(String value) {
        return valueMap.get(value);
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getDescription() {
        return description;
    }

    @Override
    public CharterReviewStatusEnum getByCode(String code) {
        return valueMap.get(code);
    }
}
